/*
* @(#) Singleton03.java 2018年02月26日
*
* Copyright 2010 NetEase.com, Inc. All rights reserved.
*/
package com.leo.m1802.d26;

/**
 * 双重检查
 * @author xuexiaolei
 * @version 2018年02月26日
 */
public class Singleton03 {
    private static volatile Singleton03 instance = null;
    private Singleton03(){}
    public static Singleton03 getInstance() {
        if (instance == null){
            synchronized (Singleton03.class){
                if (instance == null){
                    instance = new Singleton03();
                }
            }
        }
        return instance;
    }
}
